home *** CD-ROM | disk | FTP | other *** search
/ Feast Of Love Press Kit / Feast of Love Press Kit.iso / pc / intro.dxr / Internal_27_dynTextButton.ls < prev    next >
Encoding:
Text File  |  2007-08-07  |  1.3 KB  |  36 lines

  1. property pMyText, pMySize, pMyColor, pMyRollColor, pIsButton
  2.  
  3. on getPropertyDescriptionList
  4.   description = [:]
  5.   addProp(description, #pMyText, [#default: EMPTY, #format: #string, #comment: "Enter Text:"])
  6.   addProp(description, #pMySize, [#default: 18, #format: #integer, #comment: "Text Size:"])
  7.   addProp(description, #pMyColor, [#default: color(255, 255, 255), #format: #color, #comment: "Text Color:"])
  8.   addProp(description, #pIsButton, [#default: 1, #format: #boolean, #comment: "Use as a button?"])
  9.   addProp(description, #pMyRollColor, [#default: color(0, 0, 255), #format: #color, #comment: "Rollover Text Color:"])
  10.   return description
  11. end
  12.  
  13. on beginSprite me
  14.   sprite(me.spriteNum).static = 1
  15.   pMyColor = "0x" & chars(pMyColor.hexString(), 2, 7)
  16.   pMyRollColor = "0x" & chars(pMyRollColor.hexString(), 2, 7)
  17. end
  18.  
  19. on GetUrl me, theEvent
  20.   case theEvent of
  21.     "INITIALIZE":
  22.       sprite(me.spriteNum).formatText(pMyText, pMySize, pMyColor)
  23.     "ROLLOVER":
  24.       if pIsButton then
  25.         cursor(280)
  26.         sprite(me.spriteNum).formatText(pMyText, pMySize, pMyRollColor)
  27.       end if
  28.     "ROLLOUT":
  29.       if pIsButton then
  30.         cursor(-1)
  31.         sprite(me.spriteNum).formatText(pMyText, pMySize, pMyColor)
  32.       end if
  33.   end case
  34.   sprite(me.spriteNum).goToFrame(1)
  35. end
  36.